<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8">
    <title>小红帽科技|草帽聚合支付 - 后台管理 - 商户打款记录</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__ADMIN__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__ADMIN__/style/admin.css" media="all">
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">商户ID</label>
                    <div class="layui-input-block">
                        <input type="text" name="uid" placeholder="请输入ID" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">提现状态</label>
                    <div class="layui-input-block">
                        <select name="status" lay-filter="status">
                            <option value="">请选择一个状态</option>
                            <option {$Request.get.status == '0' ? 'selected' : '' } value="0">等待处理</option>
                            <option {$Request.get.status == '1' ? 'selected' : '' } value="1">处理完成</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-block">
                        <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="app-order-paid-list-search">
                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-card-body">
            <table id="app-order-paid-list" lay-filter="app-order-paid-list"></table>
            <script type="text/html" id="buttonTpl">
                {{#  if(d.status == '2'){ }}
                <button class="layui-btn layui-btn-xs">已打款</button>
                {{#  } else if(d.status == '1'){ }}
                <button class="layui-btn layui-btn-warm layui-btn-xs">等待中</button>
                {{#  } else { }}
                <button class="layui-btn layui-btn-danger layui-btn-xs">驳回</button>
                {{#  } }}
            </script>
            <script type="text/html" id="table-balance-tool">
                {{#  if(d.status == '1'){ }}
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="deal"><i class="layui-icon layui-icon-auz"></i>审核</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="rebut"><i class="layui-icon layui-icon-delete"></i>驳回</a>
                {{#  } else { }}
                <a class="layui-btn layui-btn-disabled layui-btn-xs"><i class="layui-icon layui-icon-auz"></i>审核</a>
                <a class="layui-btn layui-btn-disabled layui-btn-xs"><i class="layui-icon layui-icon-delete"></i>驳回</a>
                {{#  } }}
            </script>
        </div>
    </div>
</div>

<script src="__ADMIN__/layui/layui.js"></script>
<script>
    layui.config({
        base: '__ADMIN__/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','form','laydate','table','balance'], function(){
        var $ = layui.$
            ,laydate = layui.laydate
            ,table = layui.laydate
            ,form = layui.form;


        //同时绑定多个日期
        lay('.app-laydate-item').each(function(){
            laydate.render({
                elem: this
                ,value: new Date()
                ,trigger: 'click'
            });
        });

        //监听搜索
        form.on('submit(app-order-paid-list-search)', function(data){
            var field = data.field;

            //执行重载
            table.reload('app-order-paid-list', {
                where: field
            });
        });

    });
</script>
</body>
</html>
